#pragma once
#include <iostream>
#include <tuple>
#include "fxcc/core/graph/common/pch.h"


namespace fxcc
{
    namespace graph
    {
        namespace common
        {
            struct FXCC_API     DataIndex
            {
                std::string m_Path;
                int m_Index;
                std::string m_CustomPath;
                std::string m_Name;
                int m_OtherTag;

                std::string GetRealName()
                {
                    if(m_CustomPath.size())
                    {
                        return m_CustomPath;
                    }
                    else
                    {
                        return m_Path;
                    }
                }
                DataIndex() : m_Index(-1), m_Path("") {}

                bool FromNativePath() const
                {
                    return fs::exists(m_Path) && m_Index != -1;
                }

                bool operator<(const DataIndex &other) const
                {
                    return std::tie(m_Path, m_Index, m_CustomPath) < std::tie(other.m_Path, other.m_Index, m_CustomPath);
                }
                bool operator==(const DataIndex& other) const
                {
                    return std::tie(m_Path, m_Index, m_CustomPath) == std::tie(other.m_Path, other.m_Index, m_CustomPath);
                }
            };
        };
    };
};